//
//  YXIntroduceView.m
//  跑跑快销
//
//  Created by 杨潇 on 14-5-4.
//  Copyright (c) 2014年 ylife. All rights reserved.
//

#import "YXIntroduceView.h"

@implementation YXIntroduceView
@synthesize scrollVi,pageControl;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        int startY = STARTY;
        scrollVi = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 320, [UIScreen mainScreen].bounds.size.height - startY)];
        scrollVi.backgroundColor = [UIColor grayColor];
        scrollVi.contentSize = CGSizeMake(320 * 4, [UIScreen mainScreen].bounds.size.height - startY);
        scrollVi.pagingEnabled = YES;
        scrollVi.showsHorizontalScrollIndicator = NO;
        [self addSubview:scrollVi];
        
        pageControl = [[UIPageControl alloc] initWithFrame:CGRectMake(10, [UIScreen mainScreen].bounds.size.height - startY - 40, 0, 20)];
        pageControl.numberOfPages = 4;
        pageControl.pageIndicatorTintColor = [UIColor blackColor];
        pageControl.currentPageIndicatorTintColor = [UIColor brownColor];
        [self addSubview:pageControl];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
